package com.hy.net

import android.util.Log
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch

/**
 * @Description:
 * @Author: wdk
 * @CreateTime: 2024/6/1 22:02
 */
class MainViewModel : ViewModel() {
    companion object {
        private const val TAG = "MainViewModel"
    }

    val repository: MainRepository by lazy { MainRepository() }


    fun getBannerList() {
        viewModelScope.launch(Dispatchers.IO) {

            val bannerList = repository.getHomeBanner()

            Log.e(TAG, "getBannerList: $bannerList")

        }

    }
}